
#ifndef _KEY_PROCESS_H
#define _KEY_PROCESS_H
#include "sc95f.h"
#include "machine_stat.h"
#define  KEY_POWER              0x1//,1
#define  KEY_INCREASE           0x2//,4	
#define  KEY_DECREASE           0x4//,2   
#define  KEY_ECO                0x8//,1
#define  KEY_CYCLE            0x10
#define  KEY_MODE               0x20
#define  KEY_PREUSS               0x40

typedef enum
{
	KEY_NONE = 0,

	KEY_POWER_SHORT ,   
	KEY_POWER_LONG ,    

	KEY_INCREASE_SHORT ,  
	KEY_INCREASE_LONG ,  

	KEY_DECREASE_SHORT,   
	KEY_DECREASE_LONG,   

	KEY_ECO_SHORT,
	KEY_ECO_LONG,
	
	KEY_CYCLE_SHORT,
	KEY_CYCLE_LONG,

	KEY_MODE_SHORT,
	KEY_MODE_LONG,

	KEY_PREUSS_SHORT,
	KEY_PREUSS_LONG,

	KEY_BUZZER_SHORT,
	KEY_BUZZER_LONG,
	
	KEY_WIFI_SHORT,
	KEY_WIFI_LONG,
	
	KEY_VERSION_SHORT,
	KEY_VERSION_LONG,
 
    
	KEY_INVALID_ADDGARM     = 0xFC,  // ADDGARM KEY INVALID 
	KEY_INVALID_DOOR        = 0xFD,  // DOOR KEY INVALID 
	KEY_INVALID_KEY         = 0xFE,  // An Invalid KEY 
	KEY_KNOB                = 0xFF,  // KNOB VALID 

}KEY_NAMES;

//extern uint8_t button_stat;

 /*---------------------------------------------------------------------------*
 |  KeyInit
 |
 |  Initialize the key module. Called once on power-up.
 |
 |  For details see Key.h
 *---------------------------------------------------------------------------*/
void KeyInit(void);

/*---------------------------------------------------------------------------*
 |  KeyProcess
 |
 |  Description
 |
 |  Entry:  No requirement
 |  Exit:   Returns nothing
 *---------------------------------------------------------------------------*/
void key_process_init(void);
void button_process(void);
void KeyProcess(void);

/*---------------------------------------------------------------------------*
 |  KeyNum
 |
 |  For details see Key.h
 *---------------------------------------------------------------------------*/
//uint8_t KeyEvent(void);

//void KeyEventSet(uint8_t event);

//void clearEventListener(void);
//extern  uint8_t button_stat;
uint8_t KeyEvent(void);
uint8_t EventListener( KEY_NAMES  keyEvent);
//void Event_Clean(void);
//void Dispatch_TouchEvent(void);

uint16_t GetKeyboard(void);
//void key(void);
#endif
